public class ProxyBuyTicket implements Ticket {
    private RealBuyTicket realTicket;

    public ProxyBuyTicket(RealBuyTicket realTicket) {
        this.realTicket = realTicket;
    }

    @Override
    public void purchase() {
        System.out.println("真实购票前做的前置工作");
        realTicket.purchase();
        System.out.println("真实购票后做的收尾工作");
    }
}
